package com.zjf.controller;

import com.zjf.dao.UserPersonMapper;
import com.zjf.domain.dto.UserPersonDTO;
import com.zjf.domain.entity.UserPersonEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mapper")
public class MybatisController {

    @Autowired
    private UserPersonMapper mapper;

    @RequestMapping("/save")
    public void save(){
        UserPersonEntity entity = new UserPersonEntity();
        entity.setFullName("凡死了");
        entity.setEmail("凡@email");
        entity.setInitpwd("111111");
        entity.setPwd("111111");
        entity.setPhone("123456789");
        entity.setLoginName("kiven");
        int ret = mapper.insert(entity);
    }
}
